package com.student.wym.service.impl;

import com.student.wym.mapper.StudentMapper;
import com.student.wym.po.Student;
import com.student.wym.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements IStudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public Integer findStudentNum(Integer id) {
        return studentMapper.findStudentNum(id);
    }

    @Override
    public List<Student> findAllByExamId(int examId) {
        return studentMapper.findAllByExamId(examId);
    }

    @Override
    public void insertAll(List<Student> students) {
        studentMapper.insertAll(students);
    }

    @Override
    public List<Student> findAll() {
        return studentMapper.findAll();
    }

    @Override
    public void deleteAll() {
        studentMapper.deleteAll();
    }

    @Override
    public void insert(Student student) {
        studentMapper.insert(student);

    }

    @Override
    public Integer findEd(Integer examId) {
        return studentMapper.findEd(examId);
    }

    public Integer findPass(Integer examId) {
        return studentMapper.findPass(examId);
    }

}
